<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>预约订单管理</title>
    <link rel="stylesheet" href="/static/lib/layui-v2.5.6/layui-v2.5.6/layui/css/layui.css">
    <style>
        .layui-table-cell{
            height:36px;
            line-height: 36px;
        }
        .layui-col-xs1{
            height: 66px;
            line-height: 66px;
            margin: 5px 5px 0 0;
            text-align: center;
            font-size: 20px;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <table id="demo" lay-filter="test"></table>



        
    </script>


    
   
    <script src="/static/lib/layui-v2.5.6/layui-v2.5.6/layui/layui.js"></script>
    <script>
        
        
        
        

        layui.use(['table','laydate','form','util'], function(){
            var $ = layui.jquery;
            var table = layui.table;

            table.render({
                elem: '#demo',
                height: 'full-60',
                method: 'get',
                url: '/admin/statistic/queryCommodityToBeDeliver', //数据接口
                defaultToolbar: [],
                id: 'adTest',
                cols: [[ //表头
                {type:'numbers'},
                {field: 'commodityName', title: '商品'},
                // {field: 'orderId', title: '订单号'},
                {field: 'price', title: '单价'},
                {field: 'specifications', title: '规格'} ,
                {field: 'count', title: '数量'},
                ]],


                parseData: function(res){ //res 即为原始返回的数据
                    return {
                    "code": res.success, //解析接口状态
                    "msg": res.message, //解析提示文本
                    "count": res.data.total, //解析数据长度
                    "data": res.data //解析数据列表
                    };
                },
                request: {
                    // pageName: 'pageNum', //页码的参数名称，默认：page
                    // limitName: 'pageSize' //每页数据量的参数名，默认：limit
                },
                response: {
                    // statusName: 'success', //规定数据状态的字段名称，默认：code
                    statusCode: true //规定成功的状态码，默认：0
                }
            });
        
            
        
        });
        function status(num) {
            if(num == null) {
                var status = '订单未完成'
            }else {
                var status = num
            }
            return status
        }
    </script>
</body>
</html>